<?php
namespace app\admin\model;
use app\admin\BaseModel;
class AuthGroupAccess extends BaseModel
{
    protected $pk='uid';

    public static function setAuth($data)
    {
        $setAuth=self::update($data);
        return $setAuth;
    }

    public static function getAuthValue($id)
    {
        $value=AuthGroupAccess::alias('a')
            ->field('a.uid,a.group_id,b.title')
            ->join('auth_group b','a.group_id=b.id')
            ->where('uid','=',$id)
            ->find();
        return $value;
    }
}